<HTML><HEAD><TITLE>default_domain(-Var)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(fd)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>default_domain(-Var)</H1>
This predicate is called to assign a default domain to a free variable Var
which occurs in arithmetic constraints.


<DL>
<DT><EM>-Var</EM></DT>
<DD>
</DD>
<DT><EM>A</EM></DT>
<DD>variable
</DD>
</DL>
<H2>Description</H2>
   This is a simple hook predicate which allows the user to modify the
   domain which is by default assigned to domainless variables that occur
   in arithmetic constraints.  When such a variable is encountered, this
   predicate is invoked and it must give the variable an integer finite
   domain.  To modify the default domain, it is necessary to recompile this
   predicate in the module fd_arith.

<P>

<H3>Fail Conditions</H3>
   None


<H3>Resatisfiable</H3>
   No.
<H2>Examples</H2>
<PRE>
   [eclipse 13]: A #&gt; B.
   A = A[-9999999..10000000]
   B = B[-10000000..9999999]
   ...
   [eclipse 14]: compile(user, fd_arith).
   default_domain(X) :- X::0..100000000.
   user       compiled traceable 56 bytes in 0.00 seconds
   yes.
   [eclipse 20]: X #&gt; Y.
   X = X[1..100000000]
   Y = Y[0..99999999]



</PRE>
<H2>See Also</H2>
<A HREF="../../lib/fd/new_domain_var-1.html">new_domain_var / 1</A>, <A HREF="../../lib/fd/NN-2.html">:: / 2</A>, <A HREF="../../lib/fd/HNN-2.html">#:: / 2</A>
</BODY></HTML>
